﻿package com.morefuntek.mail;

import java.util.ArrayList;
import java.util.List;

public class Mail {
	private String to;
	private String from;
	private String authUser;
	private String authPassword;
	private String subject;
	private String body;
	private String smtpServer;
	private List<String> attachFiles = new ArrayList<String>();
	private List<String> copyTo = new ArrayList<String>();

	public void attachFiles(String... fileNames) {
		for (String file : fileNames) {
			attachFiles.add(file);
		}
	}

	public List<String> getAttachFiles() {
		return attachFiles;
	}

	public String getAuthPassword() {
		return authPassword;
	}

	public void setAuthPassword(String authPassword) {
		this.authPassword = authPassword;
	}

	public String getAuthUser() {
		return authUser;
	}

	public void setAuthUser(String authUser) {
		this.authUser = authUser;
	}

	public String getBody() {
		return body;
	}

	public void setBody(String body) {
		this.body = body;
	}

	public void setBody(Body body) {
		this.body = body.toString();
	}

	public String getFrom() {
		return from;
	}

	public void setFrom(String from) {
		this.from = from;
	}

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String getTo() {
		return to;
	}

	public void setTo(String to) {
		this.to = to;
	}

	public String getSmtpServer() {
		return smtpServer;
	}

	public List<String> getCopyTo() {
		return copyTo;
	}

	public void addCopyTo(String... copyTo) {
		for (String copy : copyTo) {
			this.copyTo.add(copy);
		}
	}

	public void setSmtpServer(String smtpServer) {
		this.smtpServer = smtpServer;
	}
}
